package com.yss.sofa.report.engine.cell.visible.form;

import com.yss.sofa.report.engine.Const;
import com.yss.sofa.report.engine.cell.ReportCell;

public class UrlTreeFormCell extends FormCell{
	private static final long serialVersionUID = -6831244968567117115L;
	private String url;
	private boolean multi;
	private boolean leaf;
	private String displayField;
	private String valueField;
	private String mode;
	private int search;
	private String query;
	protected void init(){
		super.init();
		multi=false;
		leaf=true;
		displayField="name";
		valueField="id";
		mode="remote";
		search=4;
		query=Const.NONE;
		inputType=Const.FORM_INPUT_TYPE_URL_TREE;
	}
	public void assignTo(ReportCell cell){
		UrlTreeFormCell _=(UrlTreeFormCell)cell;
		super.assignTo(_);
		_.url=this.url;
		_.multi=this.multi;
		_.leaf=this.leaf;
		_.displayField=this.displayField;
		_.valueField=this.valueField;
		_.mode=this.mode;
		_.search=this.search;
		_.query=this.query;
	}
	public UrlTreeFormCell create(){
		UrlTreeFormCell _=new UrlTreeFormCell();
		this.assignTo(_);
		return _;
	}
	public String getRenderSource() {
		return "url-tree-field";
	}
	public String getUrl() {
	
		return url;
	}
	public void setUrl(String url) {
	
		this.url = url;
	}
	public boolean isMulti() {
	
		return multi;
	}
	public void setMulti(boolean multi) {
	
		this.multi = multi;
	}
	public boolean isLeaf() {
	
		return leaf;
	}
	public void setLeaf(boolean leaf) {
	
		this.leaf = leaf;
	}
	
	/**
	 * @return the displayField
	 */
	public String getDisplayField() {
	
		return displayField;
	}
	
	/**
	 * @param displayField the displayField to set
	 */
	public void setDisplayField(String displayField) {
	
		this.displayField = displayField;
	}
	
	/**
	 * @return the valueField
	 */
	public String getValueField() {
	
		return valueField;
	}
	
	/**
	 * @param valueField the valueField to set
	 */
	public void setValueField(String valueField) {
	
		this.valueField = valueField;
	}
	@Override
	public boolean isCustom() {
		return false;
	}
	public String getMode() {
		return mode;
	}
	public void setMode(String mode) {
		this.mode = mode;
	}
	public int getSearch() {
		return search;
	}
	public void setSearch(int search) {
		this.search = search;
	}
	public String getQuery() {
		return query;
	}
	public void setQuery(String query) {
		this.query = query;
	}
}
